// Copyright (C) 2011 YANG Hao (yangh2007@gmail.com). All rights reserved.
//
// This file is part of the (cute)octopus project.
//
// This file may be distributed and/or modified under the terms of the
// GNU General Public License version 2 as published by the Free Software
// Foundation.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Author(s): YANG Hao

#ifndef OPROPERTY_H
#define OPROPERTY_H

#include <QObject>
#include <QAbstractItemModel>
#include <QDockWidget>

#include "ostd.h"

class OCTOPUS_EXPORT OPropertyModel : public QAbstractItemModel
{
public:
	OPropertyModel(QObject *parent);
	~OPropertyModel();

	QVariant data(const QModelIndex &index, int role) const;
	bool setData(const QModelIndex &index, const QVariant &value, int role);
	Qt::ItemFlags flags(const QModelIndex &index) const;
	QVariant headerData(int section, Qt::Orientation orientation,
		int role = Qt::DisplayRole) const;
	QModelIndex index(int row, int column,
		const QModelIndex &parent = QModelIndex()) const;
	QModelIndex parent(const QModelIndex &index) const;
	int rowCount(const QModelIndex &parent = QModelIndex()) const;
	int columnCount(const QModelIndex &parent = QModelIndex()) const;
};

class OCTOPUS_EXPORT OPropertyDock : public QDockWidget
{
public:
	OPropertyDock(QWidget* parent = 0);
	~OPropertyDock();
};

#endif // OPROPERTY_H
